<template>
  <div class="bottom_nav">
    <div class="bottom_nav_main">
      <div class="contact">
        <div class="phone">
          <img src="@/assets/bottom_phone.png" style="width: 44px;height: 44px;margin-right: 10px" alt="" srcset="">
<!--          <v-img-->
<!--              contain-->
<!--              width="44"-->
<!--              height="44"-->
<!--              src="@/assets/bottom_phone.png"-->
<!--          ></v-img>-->
          <span> {{ $store.state.configInfo.phone }}</span>
        </div>

        <div class="dizhi">
          {{$t('bottomNav.address')}}：{{ $store.state.configInfo.address }} <br>
          {{$t('bottomNav.phone')}}：{{ $store.state.configInfo.phone }} <br>
          {{$t('bottomNav.email')}}：{{ $store.state.configInfo.email }} <br>
        </div>

      </div>
      <div class="product">
        <div class="title">{{$t('bottomNav.product')}}</div>
        <div class="hr"></div>
        <div class="item" style="cursor: pointer" v-for="item in $store.state.configInfo.product_category" @click="productClick(item)">
          {{ item.name }}
        </div>
      </div>
      <div class="product">
        <div class="title">{{$t('bottomNav.service')}}</div>
        <div class="hr"></div>
        <div class="item" v-for="item in $store.state.configInfo.service_list">
          {{ item.title }}
        </div>
      </div>
      <div class="qrcode">
        <v-img
            contain
            width="130"
            height="130"
            style="margin-top: 54px"
            :src="$assetsURL + $store.state.configInfo.wechat"
        ></v-img>
      </div>
    </div>
    <div class="copyright">
      <div class="link">友情链接：
<!--        <a href=""></a>-->
      <a v-for="item in links" target="_blank" :href="item.url" style="text-decoration: none;color: #999999">{{item.title}}&#x3000;</a>
      </div>
      <div class="hr"></div>
      <div class="bottom">Copyright © 2023 {{ $store.state.configInfo.icp }}</div>
    </div>
  </div>
</template>

<script>
import {getLink} from "@/api/home";

export default {
  name: "BottomNav",
  data: () => ({
    links:[]
  }),
  created() {
    getLink().then(res =>{
      this.links = res.data
    }).catch(err => {

    })
  },
  methods:{
    productClick(item){
      this.$router.push({
        name: 'productList',
        query: {
          id: item.id,
          name: item.name
        }
      },()=>{})
    }
  }
}
</script>
<style scoped lang="less">
.bottom_nav {
  padding-top: 50px;
  background-color: #000000;
  width: 100%;
  //height: 380px;
}

.bottom_nav_main {
  margin: 0 auto;
  width: 1200px;
  display: flex;
  justify-content: space-between;

  .contact {
    width: 280px;

    .phone {
      display: flex;
      justify-items: center;

      span {
        color: #999999;
        font-size: 30px;
        line-height: 44px;
      }
    }

    .dizhi {
      margin-top: 50px;
      color: #999999;
      font-size: 14px;
    }
  }

  .product {
    width: 180px;

    .title {
      font-size: 18px;
      color: #999999;
    }

    .hr {
      background: #111111;
      width: 100%;
      height: 1px;
      margin: 10px 0;
    }

    .item {
      font-size: 14px;
      color: #666666;
      margin-top: 20px;
    }

  }
}


.copyright {
  margin: 0 auto;
  width: 1200px;
.link{
  font-size: 12px;
  color: #999999;
}
  .hr{
    width: 100%;
    height: 1px;
    background: #111111;
    margin: 20px 0;
  }
  .bottom {
    color: rgba(102, 102, 102, 1);
    font-size: 14px;
  }
}
</style>